
local mt = ac.skill['剑舞']
function mt:on_add()
    local hero = self.owner
    self:gc(hero:add('暴击几率',self.data1))
    self:gc(hero:add('暴击伤害',self.data2))
end



local mt = ac.skill['剑刃风暴']
mt.area = 300
mt.range = 900
mt.targettype = '点'
mt.model1 = [[c71b261174870f50a57ea84def1e288f.mdl]]

function mt:on_cast_shot()
    local hero = self.owner
    local point1 = hero:get_point()
    local point2 = self.target:get_point()
    local angle = point1/point2
    local mover = hero:launch_wave(self.model1,angle,900,1200)
    mover.on_move = function(mvr,point)
        local unit = ac.selector('unit'):range(point,100):enemy(hero):first()
        if unit then
            mvr:remove()
            point:add_effect(self.model1,3.1)
            ac.timer(1000,3,function()
                local damage = hero:get('攻击')* self.data1/100 + hero:get('攻击速度') * self.data2/100
                hero:aoe_damage(point,300,damage,self)
            end)
        end
    end
end
